package tgc.edu.yzy.repostory;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import tgc.edu.yzy.custom.CommonRepository;
import tgc.edu.yzy.entity.EimAdmin;
import tgc.edu.yzy.entity.EimInvoice;
import tgc.edu.yzy.entity.EimUser;

@Repository
public interface EimInvoiceRepository extends CommonRepository<EimInvoice, Integer>{

	Page<EimInvoice> findByEimadmin(Pageable pageable, EimAdmin id);

	List<EimInvoice> findByEimuser(EimUser id);

	public EimInvoice findByNumber(String number);
	@Transactional
	public void deleteByEimadmin_id(Integer user2);

	long countByEimadmin(EimAdmin eimadmins);

}
